import { request, json2FormData }  from '@/utils/request';

//充值列表
export function getRechargeListBack(params) {
    return request({
      url: '/back/getRechargeListBack',
      method: 'get',
      params
    })
}

//提现列表
export function getCashRequestList(params) {
    return request({
      url: '/back/getCashRequestList',
      method: 'get',
      params
    })
}

//提现详情
export function getWithdralDetail(params){
	return request({
      url: '/back/getWithdralDetail',
      method: 'get',
      params
    })
}

//充值套餐列表
export function getOptionsList(params){
	return request({
      url: '/back/getOptionsList',
      method: 'get',
      params
    })
}

//添加充值选项
export function addOptionst(data){
	return request({
      url: '/back/addOptions',
      method: 'post',
      data: json2FormData(data)
    })
}

//修改充值选项
export function updateOptions(params){
	return request({
      url: '/back/updateOptions',
      method: 'put',
      params
    })
}

//删除充值选项
export function deleteOption(params){
	return request({
      url: '/back/deleteOption',
      method: 'DELETE',
      params
    })
}

//修改提现审核状态
export function checkWithdralIsPassOrBack(params){
	return request({
      url: '/back/checkWithdralIsPassOrBack',
      method: 'put',
      params
    })
}

//申请提现
export function insertWithdraWcashBack(data){
	return request({
      url: 'back/insertWithdraWcashBack',
      method: 'post',
      data: json2FormData(data)
    })
}